package api.sea;

import conf.Url;
import org.apache.commons.lang3.RandomStringUtils;
import util.HttpClientUtils;
import util.ResponseData;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;

public class StayPreplanApi {
    private static final String stay_preplan_url= Url.Base_Url+ "consumer/lgsWtd1/process";
    public ResponseData stay_preplan(String entrustmentCode,String entrustmentId,String systemNumber,int cartonNo,Object volume,Object weights,
                                     String beginPort,String lastPort,String encasementType,String cubeType,String  bookSpaceAgent,String planStuffingDate,String
                                     etdDate,int state) throws IOException, URISyntaxException {
        Map<String,Object> data=new HashMap<>();
        data.put("entrustmentCode",entrustmentCode);
        data.put("entrustmentId",entrustmentId);
        data.put("systemNumber",systemNumber);
        data.put("cartonNo",cartonNo);
        data.put("volume",volume);
        data.put("weights",weights);
        data.put("beginPort",beginPort);
        data.put("lastPort",lastPort);
        data.put("encasementType",encasementType);
        data.put("cubeType",cubeType);
        data.put("bookSpaceAgent",bookSpaceAgent);
        data.put("planStuffingDate",planStuffingDate);
        data.put("etdDate",etdDate);
        data.put("state",state);
        return HttpClientUtils.post_json(stay_preplan_url,data);
    }
}
